<?php
/**
 * 入口文件
 * @author Yangdong Zhang <zhangyangdong@gouuse.cn>
 * @time 2018/10/12 15:41
 */

define('ROOT_PATH', dirname(__FILE__));
define('APP_NAME', '轻量级的mark note');

$host   = $_SERVER['HTTP_HOST'];
$script = $_SERVER['SCRIPT_NAME'];
$scheme = $_SERVER['REQUEST_SCHEME'];
$port   = $_SERVER['SERVER_PORT'];

$site_url = $scheme.'://'.$host.($port=='80' ? '' : ':/'.$port).$script;
define('SITE_URL', $site_url);
$end = strpos($script, '/index.php');
$app_path = substr($script,0, $end);

define('APP_PATH', $app_path);
define('RESOURCES_PATH', APP_PATH.'/resources');//资源路径

include ROOT_PATH . '/app/core.php';
